<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>属性选择器</title>
  <style>
    /* 属性选择器
    标签[属性='值']{

    }
     */
    /* input[type='text'] {
      background-color: red;
    } */

    /* 以什么开头 */
    /* input[name|='user'] {
      background-color: aquamarine;
    } */

    input[name^=user] {
      background-color: antiquewhite;
    }
  </style>
</head>

<body>
  <form action="#">
    用户名：<input type="text" name="username" id="">
    密码：<input type="password" name="user-name" id="">
  </form>

</body>

</html>